README for Funk, Kendall D, Hannah L. Paul and Andrew Q. Philips. "Point break: Using machine learning to uncover a critical mass in women’s representation." Forthcoming at Political Science Research and Methods.

Last updated: July 19, 2021

Summary and notes:
	-Below, all figures/tables in the main document and SI are listed, as well as the corresponding script needed to produce them. 
	-Scripts are listed below, as well as the files they produce. All scripts also have the figures they produce (in order) listed at the top of the script. 
	-Log files have also been created for all scripts (except Excel file). 

-------- SCRIPTS -----------
* Theory Graphs.xlsx: Excel file to create the theory figures in Figure 1. Figures created:
	-Figure 1

* create-logs-figs.R: creates all log files and runs all R scripts below
* main-analysis.R: estimates random forests for the main manuscript. Figures created:
	-Figure 3c: "VIPfull_defense.pdf"
	-Figure 3a: "VIPfull_edu.pdf"
	-Figure 3b: "VIPfull_health.pdf"
	-Figure 4: "pctwomen_3expenditures_PDP.pdf"
	-Figure 5a: "pctwomen_democracyinteraction_edu.pdf"
	-Figure 5b: "pctwomen_democracyinteraction_health.pdf"
	-Figure 5c: "pctwomen_democracyinteraction_mil.pdf"
	-Figure 6a: "pctwomen_yearinteraction_edu.pdf"
	-Figure 6b: "pctwomen_yearinteraction_health.pdf"
	-Figure 6c: "pctwomen_yearinteraction_mil.pdf"
	-Figure 7: "pctwomen_3expenditures_implementedquotainteraction.pdf"
	-SI Figure 1: "pctwomen_3expenditures_ICE.pdf"
	-SI Figure 2: "alternative_dependence_edu.pdf"
	-SI Figure 3: "alternative_dependence_health.pdf"
	-SI Figure 4: "alternative_dependence_mil.pdf"
	-SI Figure 8a: "alternative_estimators_edu.pdf"
	-SI Figure 8b: "alternative_estimators_health.pdf" -SI Figure 8c: "alternative_estimators_mil.pdf"

* table-1.do: creates main table in main manuscript. Tables created:
	-Table 1

* tables-1-2-3-si.do: creates tables for SI. Tables created:
	-SI Table 1
	-SI Table 2
	-SI Table 3

* histogram-SI-robustness-OLS.do: creates summary statistic plots and several robustness checks. Files created:
	-Figure 2: "QuotaScatterplot.png"
	-SI Figure 5: "education_OLSresults.pdf"
	-SI Figure 6: "health_OLSresults.pdf"
	-SI Figure 7: "defense_OLSresults.pdf"
	-SI Figure 16: "QuotaScatterplot.png"


* SI-leftgovt.R: estimates results from the main paper, with the inclusion of a left government variable. Figures created:
	-SI Figure 9: "VIPfull_edu_wleft.pdf"
	-SI Figure 10: "VIPfull_health_wleft.pdf"
	-SI Figure 11: "VIPfull_defense_wleft.pdf"
	-SI Figure 12: "pctwomen_3expenditures_PDP_wleft.pdf"
	-SI Figure 13a: "pctwomen_democracyinteraction_edu_wleft.pdf"
	-SI Figure 13b: "pctwomen_democracyinteraction_health_wleft.pdf"
	-SI Figure 13c: "pctwomen_democracyinteraction_mil_wleft.pdf"
	-SI Figure 14a: "pctwomen_yearinteraction_edu_wleft.pdf"
	-SI Figure 14b: "pctwomen_yearinteraction_health_wleft.pdf"
	-SI Figure 14c: "pctwomen_yearinteraction_mil_wleft.pdf"
	-SI Figure 15: "pctwomen_3expenditures_implementedquotainteraction_wleft.pdf"

* SI-noquota.R: estimates results from the main paper, but dropping all gender quota variables. Figures created:
	-SI Figure 17: "VIPfull_edu_noquota.pdf"
	-SI Figure 18: "VIPfull_health_noquota.pdf"
	-SI Figure 19: "VIPfull_defense_noquota.pdf"
	-SI Figure 20: "pctwomen_3expenditures_PDP_noquota.pdf"
	-SI Figure 21a: "pctwomen_democracyinteraction_edu_noquota.pdf"
	-SI Figure 21b: "pctwomen_democracyinteraction_health_noquota.pdf"
	-SI Figure 21c: "pctwomen_democracyinteraction_mil_noquota.pdf"
	-SI Figure 22a: "pctwomen_yearinteraction_edu_noquota.pdf"
	-SI Figure 22b: "pctwomen_yearinteraction_health_noquota.pdf"
	-SI Figure 22c: "pctwomen_yearinteraction_mil_noquota.pdf"
----------------------------


-------- LOG FILES -----------
* log-main-analysis.R.txt: log for main-analysis.R
* log-table-1.smcl: log for table-1.do
* log-tables-1-2-3-si.smcl: log for tables-1-2-3-si.do
* log-histogram-SI-robustness-OLS: log for histogram-SI-robustness-OLS.do
* log-SI-leftgovt.R.txt: log for SI-leftgovt.R
* log-SI-noquota.R.txt: log for SI-noquota.R
----------------------------


------- OTHER ------------
* Codebook.rtf: codebook for dataset
* funk-paul-philips-replication.dta: dataset
* FunkPaulPhilips_SI.pdf: supplemental information document
--------------------------


-------- MAIN DOCUMENT -----------
* Figure 1: Hypothesized Effects of Women's Numeric Representation on Government Expenditures
	Source: "Theory Graphs.xlsx"
	Note: The 6 figures in Figure 1 can be created using the synthetic data generated in each of the excel sheets.

* Figure 2: "percentwomen.png"
	Source: histogram-percentwomen.do

* Figure 3a, 3b, 3c: "VIPfull_edu", "VIPfull_health", "VIPfull_defense"
	Source: main-analysis.R

* Figure 4: "pctwomen_3expenditures_PDP.pdf"
	Source: main-analysis.R

* Figure 5a, 5b, 5c: "pctwomen_democracyinteraction_edu", "pctwomen_democracyinteraction_health", "pctwomen_democracyinteraction_mil"
	Source: main-analysis.R

* Figure 6a, 6b, 6c: "pctwomen_yearinteraction_edu", "pctwomen_yearinteraction_health", "pctwomen_yearinteraction_mil"
	Source: main-analysis.R
	
* Figure 7: "pctwomen_3expenditures_implementedquotainteraction"
	Source: main-analysis.R

* Table 1: "Education Spending"
	Source: table-1.do
	
----------------------------------


-------- SI -----------
* Figure 1: "pctwomen_3expenditures_ICE"
	Source: main-analysis.R

* Figure 2: "alternative_dependence_edu"
	Source: main-analysis.R

* Figure 3: "alternative_dependence_health"
	Source: main-analysis.R

* Figure 4: "alternative_dependence_mil"
	Source: main-analysis.R

* Figure 5: "education_OLSresults"
	Source: histogram-SI-robustness-OLS.do

* Figure 6: "health_OLSresults"
	Source: histogram-SI-robustness-OLS.do

* Figure 7: "defense_OLSresults"
	Source: histogram-SI-robustness-OLS.do

* Figure 8a, 8b, 8c: "alternative_estimators_edu", "alternative_estimators_health", "alternative_estimators_mil"
	Source: main-analysis.R

* Figure 9: "VIPfull_edu_wleft"
	Source: SI-leftgovt.R

* Figure 10: "VIPfull_health_wleft"
	Source: SI-leftgovt.R

* Figure 11: "VIPfull_defense_wleft"
	Source: SI-leftgovt.R

* Figure 12: "pctwomen_3expenditures_PDP_wleft"
	Source: SI-leftgovt.R

* Figure 13a, 13b, 13c: "pctwomen_democracyinteraction_edu_wleft", "pctwomen_democracyinteraction_health_wleft", "pctwomen_democracyinteraction_mil_wleft"
	Source: SI-leftgovt.R

* Figure 14a, 14b, 14c: "pctwomen_yearinteraction_edu_wleft", "pctwomen_yearinteraction_health_wleft", "pctwomen_yearinteraction_mil_wleft"
	Source: SI-leftgovt.R

* Figure 15: "pctwomen_3expenditures_implementedquotainteraction_wleft"
	Source: SI-leftgovt.R

* Figure 16: "QuotaScatterplot"
	Source: histogram-SI-robustness-OLS.do

* Figure 17: "SI_VIPfull_edu_noquota"
	Source: SI-noquota.R

* Figure 18: "SI_VIPfull_health_noquota"
	Source: SI-noquota.R

* Figure 19: "SI_VIPfull_defense_noquota"
	Source: SI-noquota.R

* Figure 20: "SI_pctwomen_3expenditures_PDP_noquota"
	Source: SI-noquota.R

* Figure 21a 21b 21c: "SI_pctwomen_democracyinteraction_edu_noquota", "SI_pctwomen_democracyinteraction_health_noquota", "SI_pctwomen_democracyinteraction_mil_noquota"
	Source: SI-noquota.R

* Figure 22a 22b 22c: "SI_pctwomen_yearinteraction_edu_noquota", "SI_pctwomen_yearinteraction_health_noquota", "SI_pctwomen_yearinteraction_mil_noquota"
	Source: SI-noquota.R

* Table 1: Education Spending
	Source: tables-1-2-3-si.do

* Table 2: Education Spending
	Source: tables-1-2-3-si.do

* Table 3: Education Spending
	Source: tables-1-2-3-si.do

----------------------------------
